using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Daan;

public class AIAgentManager : Manager<AIAgentManager>
{
    private Dictionary<string, GlmAgent> dict = new Dictionary<string, GlmAgent>();

    private void Awake()
    {
        var list = this.GetComponentsInChildren<GlmAgent>();
        foreach (var item in list)
        {
            this.dict.Add(item.gameObject.name, item);
        }
    }

    public GlmAgent Get(string name) 
    {
        return this.dict.TryGet(name);
    }
}
